package com.yhn.init.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yhn.init.common.DeleteRequest;
import com.yhn.init.model.dto.financialTransactions.FinancialTransactionsAddRequest;
import com.yhn.init.model.dto.financialTransactions.FinancialTransactionsQueryRequest;
import com.yhn.init.model.dto.financialTransactions.FinancialTransactionsUpdateRequest;
import com.yhn.init.model.entity.FinancialTransactions;
import com.yhn.init.model.vo.FinancialTransactionsVO;

import java.util.List;

/**
 * 收支记录
 *
 * @author yhnyhn123
 * @email 2236751002@qq.com
 * @date 2024-03-08 20:36:42
 */
public interface FinancialTransactionsService extends IService<FinancialTransactions> {

    Page<FinancialTransactionsVO> queryPage(FinancialTransactionsQueryRequest financialTransactionsQueryRequest);

    /**
     * 获取查询条件(分页)
     *
     * @param financialTransactionsQueryRequest
     * @return
     */
    QueryWrapper<FinancialTransactions> getQueryWrapper(FinancialTransactionsQueryRequest financialTransactionsQueryRequest);

    /**
     * 将对象转化为脱敏对象
     *
     * @param financialTransactions 原对象
     * @return 脱敏对象
     */
    FinancialTransactionsVO getFinancialTransactionsVO(FinancialTransactions financialTransactions);

    /**
     * 获取脱敏对象集合
     *
     * @param financialTransactionsList 原对象
     * @return 脱敏对象集合
     */
    List<FinancialTransactionsVO> getFinancialTransactionsVO(List<FinancialTransactions> financialTransactionsList);


    /**
     * 根据ID获取信息
     *
     * @param id ID信息
     * @return 实体信息
     */
    FinancialTransactionsVO getInfoById(Long id);

    /**
     * 保存信息
     *
     * @param financialTransactionsAddRequest 添加请求
     * @return 新生成的ID
     */
    Long saveFinancialTransactions(FinancialTransactionsAddRequest financialTransactionsAddRequest);

    /**
     * 修改信息
     *
     * @param financialTransactionsUpdateRequest 修改请求
     * @return 是否修改成功
     */
    Boolean updateFinancialTransactions(FinancialTransactionsUpdateRequest financialTransactionsUpdateRequest);


    /**
     * 删除信息
     *
     * @param deleteRequest 删除请求
     * @return 是否修改成功
     */
    Boolean deleteById(DeleteRequest deleteRequest);


    /**
     * 批量删除
     *
     * @param ids 批量删除的IDS
     * @return 是否删除成功
     */
    Boolean deleteBatchByIds(Long[] ids);
}

